import instance from '@/request/request'

/**
 * 添加职称
 * @param data
 * @returns {*}
 * @constructor
 */
export const addTitleApi = (data) => {
  return instance({
    url: `/api/title/addTitle`,
    method: 'post',
    data
  })
}
/**
 * 分页查询信息
 * @param param
 * @returns {*}
 * @constructor
 */
export  const GetTitlePageApi=(param)=>{
  return instance({
    url:`/api/title/page`,
    method:'get',
    params:param
  })
}
/**
 * 根据id查询信息
 * @param id
 * @returns {Promise<AxiosResponse<any>> | *}
 * @constructor
 */
export const GetTitleByIdApi=(id)=>{
  return instance({
    url:`/api/title/${id}`,
    method:'get'
  })
}


export const GetAllTitleApi=()=>{
  return instance({
    url:`/api/title/all`,
    method:'get'
  })
}
/**
 * 删除通知
 * @param ids
 * @returns {*}
 * @constructor
 */
export const DeleteTitleApi=(ids)=>{
  return instance({
    url:`/api/title/delete`,
    method:'delete',
    params:{ids}
  })
}

/**
 * 修改通知
 * @param data
 * @returns {Promise<AxiosResponse<any>> | *}
 * @constructor
 */
export const UpdateTitleByIdApi=(data)=>{
  return instance({
    url: `/api/title/update`,
    method:'put',
    data
  })
}
